#ifndef __NETWORK_H__

#define __NETWORK_H__

typedef int NETWORK_ERR;
#define NETWORK_OK           0x00
#define NETWORK_SOCKET_ERROR 0x01
#define NETWORK_ACCEPT_ERROR 0x02
#define NETWORK_SEND_ERROR   0x03

#define RCVBUFSIZE 32

NETWORK_ERR startSocket(int *sock);
NETWORK_ERR acceptConnection(int sock, int *new_sock);
NETWORK_ERR listenSocket(int new_sock, int *bytesRcvd, char *echoBuffer);
NETWORK_ERR closeSocket(int sock);
NETWORK_ERR sendResponse(int sock, char *msg, int msgLen);

#endif
